#ifndef MAINSCENE_H
#define MAINSCENE_H

#include <QWidget>
#include "stone.h"

QT_BEGIN_NAMESPACE
namespace Ui { class mainscene; }
QT_END_NAMESPACE

class mainscene : public QWidget
{
    Q_OBJECT

public:
    mainscene(QWidget *parent = nullptr);
    stone sto[12];
    int selected_id = -1;
    const int startx = 100;
    const int starty = 200;
    const int d = 80;
    bool is_selected = false;
    int player = 1;
    void paintEvent(QPaintEvent *event);
    void mousePressEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);
    bool canMove(int x,int y);
    bool isWin();

    ~mainscene();

private:
    Ui::mainscene *ui;
};
#endif // MAINSCENE_H
